package com.xbongbong.pro.message.enums;/*/*/

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.pro.constant.CommonConstant;
import lombok.Getter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Description: 消息筛选状态tag枚举
 * @author 魏荣杰
 * @date 2019/1/7 17:35
 * @version v1.0
 * @since v1.0
 */
@Getter
public enum MessageListSearchFilterStatusTagEnum {

    /**
     * 全部
     */
    ALL(1, CommonConstant.ALL, "all"),
    /**
     * 未读
     */
    UNREAD(2, CommonConstant.UNREAD, "unread"),
    /**
     * 已读
     */
    READ(3, CommonConstant.READ, "read"),
    ;

    /**
     * 枚举值
     */
    private final Integer id;

    /**
     * 标签名称
     */
    private final String name;

    /**
     * 标签英文名
     */
    private final String alias;

    MessageListSearchFilterStatusTagEnum(Integer id, String name, String alias) {
        this.id = id;
        this.name = name;
        this.alias = alias;
    }

    /**
     * Description: 获取所有的枚举
     * @return java.util.List<com.xbongbong.pro.message.enums.MessageListSearchFilterStatusTagEnum>
     * @author 魏荣杰
     * @date 2019/1/8 14:26
     * @since v1.0
     */
    public static List<MessageListSearchFilterStatusTagEnum> getAllEnum() {
        List<MessageListSearchFilterStatusTagEnum> list = new ArrayList<>();
        list.addAll(Arrays.asList(values()));
        return list;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
